import {simpleGet} from "@/utils/request";

const orderService : any = {
    orderStatus : {
        unpaid:{id: 'unpaid', title: '待付款'},
        paid: {id: 'paid', title: '已付款'},
        wait: {id: 'wait', title: '待发货'},
        receive: {id: 'receive', title: '待收货'},
        reply:{id: 'reply', title: '待评价'},
        done:{id: 'done', title: '已完成'},
        close:{id: 'close', title: '已关闭'},
    } as any,

    refundStatus : {
        0:{id: 0, title: '未审核', type:'warning'},
        1:{id: 1, title: '已退款', type:''},
        // 2:{id: 2, title: '极速退款', type:'success'},
        '-1':{id: -1, title: '拒绝退款', type:'danger'}
    } as any,
    orderType: {
        normal:{id:'normal', title:"商品订单"},
        seckill:{id:'seckill', title:"秒杀订单"},
        group:{id:'normal', title:"拼团订单"},
        points:{id:'normal', title:"积分订单"},
    } as any,

    payType:{
        wx:{id:'wx', title:"微信支付"},
        balance:{id:'balance', title:"余额支付"},
    },

    async find(id:number){
        const {info}:any = await simpleGet("/store.order/edit",{id})
        return info
    }

}
export default orderService
